﻿using FluentValidation;

namespace SwaggerDoc.Api.Validator
{
    public class UserValidator : AbstractValidator<UserRequest>
    {
        public UserValidator()
        {
            //ClassLevelCascadeMode = CascadeMode.Stop;

            RuleFor(i => i.Name).NotEmpty().WithMessage("姓名不能为空");

            RuleFor(i => i.Phone).NotEmpty().WithMessage("手机不能为空");
        }
    }
}
